Integrand size = 25, antiderivative size = 91 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=-\text {arccosh}(x)+\sqrt {\frac {2}{5} \left (-1+\sqrt {5}\right )} \arctan \left (\frac {\sqrt {1+x}}{\sqrt {-2+\sqrt {5}} \sqrt {-1+x}}\right )+\sqrt {\frac {2}{5} \left (1+\sqrt {5}\right )} \text {arctanh}\left (\frac {\sqrt {1+x}}{\sqrt {2+\sqrt {5}} \sqrt {-1+x}}\right ) \]
[Out]
Leaf count is larger than twice the leaf count of optimal. \(191\) vs. \(2(91)=182\).
Time = 0.11 (sec) , antiderivative size = 191, normalized size of antiderivative = 2.10, number of steps used = 9, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {915, 1005, 223, 212, 1048, 739, 210} \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=\frac {\sqrt {\frac {1}{10} \left (\sqrt {5}-1\right )} \sqrt {x-1} \sqrt {x+1} \arctan \left (\frac {2-\left (1-\sqrt {5}\right ) x}{\sqrt {2 \left (\sqrt {5}-1\right )} \sqrt {x^2-1}}\right )}{\sqrt {x^2-1}}-\frac {\sqrt {x-1} \sqrt {x+1} \text {arctanh}\left (\frac {x}{\sqrt {x^2-1}}\right )}{\sqrt {x^2-1}}-\frac {\sqrt {\frac {1}{10} \left (1+\sqrt {5}\right )} \sqrt {x-1} \sqrt {x+1} \text {arctanh}\left (\frac {2-\left (1+\sqrt {5}\right ) x}{\sqrt {2 \left (1+\sqrt {5}\right )} \sqrt {x^2-1}}\right )}{\sqrt {x^2-1}} \]
[In]
[Out]
Rule 210
Rule 212
Rule 223
Rule 739
Rule 915
Rule 1005
Rule 1048
Rubi steps \begin{align*} \text {integral}& = \frac {\left (\sqrt {-1+x} \sqrt {1+x}\right ) \int \frac {\sqrt {-1+x^2}}{1+x-x^2} \, dx}{\sqrt {-1+x^2}} \\ & = -\frac {\left (\sqrt {-1+x} \sqrt {1+x}\right ) \int \frac {1}{\sqrt {-1+x^2}} \, dx}{\sqrt {-1+x^2}}+\frac {\left (\sqrt {-1+x} \sqrt {1+x}\right ) \int \frac {x}{\left (1+x-x^2\right ) \sqrt {-1+x^2}} \, dx}{\sqrt {-1+x^2}} \\ & = -\frac {\left (\sqrt {-1+x} \sqrt {1+x}\right ) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt {-1+x^2}}\right )}{\sqrt {-1+x^2}}+\frac {\left (\left (5-\sqrt {5}\right ) \sqrt {-1+x} \sqrt {1+x}\right ) \int \frac {1}{\left (1-\sqrt {5}-2 x\right ) \sqrt {-1+x^2}} \, dx}{5 \sqrt {-1+x^2}}+\frac {\left (\left (5+\sqrt {5}\right ) \sqrt {-1+x} \sqrt {1+x}\right ) \int \frac {1}{\left (1+\sqrt {5}-2 x\right ) \sqrt {-1+x^2}} \, dx}{5 \sqrt {-1+x^2}} \\ & = -\frac {\sqrt {-1+x} \sqrt {1+x} \tanh ^{-1}\left (\frac {x}{\sqrt {-1+x^2}}\right )}{\sqrt {-1+x^2}}-\frac {\left (\left (5-\sqrt {5}\right ) \sqrt {-1+x} \sqrt {1+x}\right ) \text {Subst}\left (\int \frac {1}{-4+\left (1-\sqrt {5}\right )^2-x^2} \, dx,x,\frac {2-\left (1-\sqrt {5}\right ) x}{\sqrt {-1+x^2}}\right )}{5 \sqrt {-1+x^2}}-\frac {\left (\left (5+\sqrt {5}\right ) \sqrt {-1+x} \sqrt {1+x}\right ) \text {Subst}\left (\int \frac {1}{-4+\left (1+\sqrt {5}\right )^2-x^2} \, dx,x,\frac {2-\left (1+\sqrt {5}\right ) x}{\sqrt {-1+x^2}}\right )}{5 \sqrt {-1+x^2}} \\ & = \frac {\sqrt {\frac {1}{10} \left (-1+\sqrt {5}\right )} \sqrt {-1+x} \sqrt {1+x} \tan ^{-1}\left (\frac {2-\left (1-\sqrt {5}\right ) x}{\sqrt {2 \left (-1+\sqrt {5}\right )} \sqrt {-1+x^2}}\right )}{\sqrt {-1+x^2}}-\frac {\sqrt {-1+x} \sqrt {1+x} \tanh ^{-1}\left (\frac {x}{\sqrt {-1+x^2}}\right )}{\sqrt {-1+x^2}}-\frac {\sqrt {\frac {1}{10} \left (1+\sqrt {5}\right )} \sqrt {-1+x} \sqrt {1+x} \tanh ^{-1}\left (\frac {2-\left (1+\sqrt {5}\right ) x}{\sqrt {2 \left (1+\sqrt {5}\right )} \sqrt {-1+x^2}}\right )}{\sqrt {-1+x^2}} \\ \end{align*}
Time = 0.30 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.12 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=-\sqrt {\frac {2}{5} \left (-1+\sqrt {5}\right )} \arctan \left (\sqrt {-2+\sqrt {5}} \sqrt {\frac {-1+x}{1+x}}\right )-2 \text {arctanh}\left (\sqrt {\frac {-1+x}{1+x}}\right )+\sqrt {\frac {2}{5} \left (1+\sqrt {5}\right )} \text {arctanh}\left (\sqrt {2+\sqrt {5}} \sqrt {\frac {-1+x}{1+x}}\right ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(230\) vs. \(2(65)=130\).
Time = 0.60 (sec) , antiderivative size = 231, normalized size of antiderivative = 2.54
method | result | size |
default | \(-\frac {\sqrt {1+x}\, \sqrt {-1+x}\, \sqrt {5}\, \left (\sqrt {5}\, \sqrt {2 \sqrt {5}-2}\, \sqrt {2 \sqrt {5}+2}\, \ln \left (x +\sqrt {x^{2}-1}\right )-\sqrt {5}\, \sqrt {2 \sqrt {5}-2}\, \operatorname {arctanh}\left (\frac {\sqrt {5}\, x +x -2}{\sqrt {2 \sqrt {5}+2}\, \sqrt {x^{2}-1}}\right )-\sqrt {5}\, \sqrt {2 \sqrt {5}+2}\, \arctan \left (\frac {\sqrt {5}\, x -x +2}{\sqrt {2 \sqrt {5}-2}\, \sqrt {x^{2}-1}}\right )-\sqrt {2 \sqrt {5}-2}\, \operatorname {arctanh}\left (\frac {\sqrt {5}\, x +x -2}{\sqrt {2 \sqrt {5}+2}\, \sqrt {x^{2}-1}}\right )+\sqrt {2 \sqrt {5}+2}\, \arctan \left (\frac {\sqrt {5}\, x -x +2}{\sqrt {2 \sqrt {5}-2}\, \sqrt {x^{2}-1}}\right )\right )}{5 \sqrt {2 \sqrt {5}-2}\, \sqrt {2 \sqrt {5}+2}\, \sqrt {x^{2}-1}}\) | \(231\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 201 vs. \(2 (65) = 130\).
Time = 0.43 (sec) , antiderivative size = 201, normalized size of antiderivative = 2.21 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=\frac {1}{10} \, \sqrt {5} \sqrt {2 \, \sqrt {5} + 2} \log \left (2 \, \sqrt {x + 1} \sqrt {x - 1} - 2 \, x + \sqrt {5} + \sqrt {2 \, \sqrt {5} + 2} + 1\right ) - \frac {1}{10} \, \sqrt {5} \sqrt {2 \, \sqrt {5} + 2} \log \left (2 \, \sqrt {x + 1} \sqrt {x - 1} - 2 \, x + \sqrt {5} - \sqrt {2 \, \sqrt {5} + 2} + 1\right ) - \frac {1}{10} \, \sqrt {5} \sqrt {-2 \, \sqrt {5} + 2} \log \left (2 \, \sqrt {x + 1} \sqrt {x - 1} - 2 \, x - \sqrt {5} + \sqrt {-2 \, \sqrt {5} + 2} + 1\right ) + \frac {1}{10} \, \sqrt {5} \sqrt {-2 \, \sqrt {5} + 2} \log \left (2 \, \sqrt {x + 1} \sqrt {x - 1} - 2 \, x - \sqrt {5} - \sqrt {-2 \, \sqrt {5} + 2} + 1\right ) + \log \left (\sqrt {x + 1} \sqrt {x - 1} - x\right ) \]
[In]
[Out]
\[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=- \int \frac {\sqrt {x - 1} \sqrt {x + 1}}{x^{2} - x - 1}\, dx \]
[In]
[Out]
\[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=\int { -\frac {\sqrt {x + 1} \sqrt {x - 1}}{x^{2} - x - 1} \,d x } \]
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.18 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=\log \left ({\left (\sqrt {x + 1} - \sqrt {x - 1}\right )}^{2}\right ) \]
[In]
[Out]
Time = 14.73 (sec) , antiderivative size = 916, normalized size of antiderivative = 10.07 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=-4\,\mathrm {atanh}\left (\frac {\sqrt {x-1}-\mathrm {i}}{\sqrt {x+1}-1}\right )-\frac {\sqrt {10}\,\mathrm {atan}\left (\frac {3408370\,\sqrt {10}\,\sqrt {\sqrt {5}+1}-\sqrt {10}\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,300730{}\mathrm {i}-3408370\,\sqrt {10}\,\sqrt {\sqrt {5}+1}\,\sqrt {x+1}-1771398\,\sqrt {5}\,\sqrt {10}\,\sqrt {\sqrt {5}+1}+7836865\,\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}+3066340\,\sqrt {10}\,x^2\,\sqrt {\sqrt {5}+1}-1294942\,\sqrt {5}\,\sqrt {10}\,x^2\,\sqrt {\sqrt {5}+1}+\sqrt {10}\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,\sqrt {x+1}\,300730{}\mathrm {i}-\sqrt {5}\,\sqrt {10}\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,134482{}\mathrm {i}+1771398\,\sqrt {5}\,\sqrt {10}\,\sqrt {\sqrt {5}+1}\,\sqrt {x+1}-\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,300730{}\mathrm {i}-6132680\,\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}\,\sqrt {x+1}-3475583\,\sqrt {5}\,\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}+\sqrt {5}\,\sqrt {10}\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,\sqrt {x+1}\,134482{}\mathrm {i}+\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,\sqrt {x+1}\,150365{}\mathrm {i}-\sqrt {5}\,\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,134482{}\mathrm {i}+2589884\,\sqrt {5}\,\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}\,\sqrt {x+1}+\sqrt {5}\,\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,\sqrt {x+1}\,67241{}\mathrm {i}}{29119280\,x-24066900\,x\,\sqrt {x+1}-11518800\,\sqrt {5}\,x-10104760\,\sqrt {x+1}-7067880\,\sqrt {5}-3992430\,\sqrt {5}\,x^2+12033450\,x^2+7067880\,\sqrt {5}\,\sqrt {x+1}+7984860\,\sqrt {5}\,x\,\sqrt {x+1}+10104760}\right )\,\sqrt {\sqrt {5}+1}\,1{}\mathrm {i}}{5}-\frac {\sqrt {10}\,\mathrm {atan}\left (\frac {3408370\,\sqrt {10}\,\sqrt {1-\sqrt {5}}+3066340\,\sqrt {10}\,x^2\,\sqrt {1-\sqrt {5}}-\sqrt {10}\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,300730{}\mathrm {i}-3408370\,\sqrt {10}\,\sqrt {1-\sqrt {5}}\,\sqrt {x+1}+1771398\,\sqrt {5}\,\sqrt {10}\,\sqrt {1-\sqrt {5}}+7836865\,\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}+3475583\,\sqrt {5}\,\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}+1294942\,\sqrt {5}\,\sqrt {10}\,x^2\,\sqrt {1-\sqrt {5}}+\sqrt {10}\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,\sqrt {x+1}\,300730{}\mathrm {i}+\sqrt {5}\,\sqrt {10}\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,134482{}\mathrm {i}-1771398\,\sqrt {5}\,\sqrt {10}\,\sqrt {1-\sqrt {5}}\,\sqrt {x+1}-\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,300730{}\mathrm {i}-6132680\,\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}\,\sqrt {x+1}-\sqrt {5}\,\sqrt {10}\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,\sqrt {x+1}\,134482{}\mathrm {i}+\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,\sqrt {x+1}\,150365{}\mathrm {i}+\sqrt {5}\,\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,134482{}\mathrm {i}-2589884\,\sqrt {5}\,\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}\,\sqrt {x+1}-\sqrt {5}\,\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,\sqrt {x+1}\,67241{}\mathrm {i}}{29119280\,x-24066900\,x\,\sqrt {x+1}+11518800\,\sqrt {5}\,x-10104760\,\sqrt {x+1}+7067880\,\sqrt {5}+3992430\,\sqrt {5}\,x^2+12033450\,x^2-7067880\,\sqrt {5}\,\sqrt {x+1}-7984860\,\sqrt {5}\,x\,\sqrt {x+1}+10104760}\right )\,\sqrt {1-\sqrt {5}}\,1{}\mathrm {i}}{5} \]
[In]
[Out]